@extends('layouts.default')
@section('content')     
<div class="box">
    <header>
        <div class="icons">
            <i class="fa fa-table"></i>
        </div>
        <h5>{{ Lang::get('messages.in_fleet') }}</h5>
    </header>
    <div id="collapse4" class="body">
        <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>{{ Lang::get('messages.make') }}</th>
                    <th>{{ Lang::get('messages.model')}}</th>
                    <th>{{ Lang::get('messages.license')}}</th>
                    <th>{{ Lang::get('messages.milage')}}</th>                                   
                    <th>{{ Lang::get('messages.status')}}</th>                                   
                </tr>
            </thead>
            <tbody>                             
                @foreach ($result as $r)
                @if( Helpers\Helper::sum($r->sgs, $r->tpl, $r->kasko, $r->inter_permis, $date, $limit_date) >= 5 
                && (Helpers\Helper::sum($r->sgs, $r->tpl, $r->kasko, $r->inter_permis, $date, $limit_date) <= 20)) 
                <tr> 
                    <td>{{ $r->id }}</td>                                  
                    <td>{{ link_to_action('CarController@show', $r->Make, $r->id)}}</td>  
                    <td>{{ $r->Model }}</td> 
                    <td>{{ $r->License }}</td>  
                    <td>{{ $r->Milage }}</td> 
                    <td>
                        {{ HTML::image("assets/img/warning_20.png", "Warning", array('title'=>Lang::get(
                                                'messages.warning_status_tltp')))
                        }}
                    </td> 
                </tr> 
                @endif
                @endforeach
            </tbody>
        </table>
    </div>
</div>        
@stop
